#include<iostream>
using namespace std;
#include<unordered_map>
#include<unordered_set>
#include <map>
#include <set>
#include<time.h>
#include <vector>
#include "HashTable.h"
void test_op()
{
	int n = 100000;
	vector <int> v;
	v.reserve(n);
	srand(time(0));
	for (int i = 0; i < n; ++i)
	{
		v.push_back(rand()+1);
	}
	size_t begin1 = clock();
	set<int> s;
	for (auto e : v)
	{
		s.insert(e);
	}
	size_t end1 = clock();

	size_t begin2 = clock();
	unordered_set<int> us;
	for (auto e : v)
	{
		us.insert(e);
	}
	size_t end2 = clock();

	cout << s.size() << endl;
	cout << "set insert:" << end1 - begin1 << endl;
	cout << "unorderset insert:" << end2 - begin2 << endl;

	size_t begin3 = clock();
	for (auto e : v)
	{
		s.find(e);
	}
	size_t end3 = clock();

	size_t begin4 = clock();
	for (auto e : v)
	{
		us.find(e);
	}
	size_t end4 = clock();
	cout << "set find:" << end3 - begin3 << endl;
	cout << "unorderset find:" << end4 - begin4 << endl;

}
int main()
{
	//test_op();
	//testht1();
	//testht2();
	HashBucket::testht1();
	return 0;
}